<ui:composition template="/pages/templates/layout.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui">

	<ui:define name="title">Liste des Articles redigés par un  journaliste</ui:define>
	<ui:define name="content">
		<h:form id="form">
			<p:messages id="messages" showDetail="true" autoUpdate="true"
				closable="true" />

			<p:panel id="toggleable" header="LISTES DES ARTICLES "
				toggleable="true" toggleSpeed="500" widgetVar="panel">
				<h:panelGrid columns="3" cellpadding="10">
				</h:panelGrid>

				<p:dataTable id="table" var="articls"
					selection="#{wizardBean.selectedArticle}" selectionMode="single"
					value="#{wizardBean.articles}" rowKey="#{articls.articleId}"
					paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
					paginator="true" rows="10" rowsPerPageTemplate="5,10,15"
					styleClass="table">
					<p:ajax event="rowSelect" update=":form"
						listener="#{wizardBean.updateField}" />
					<p:column headerText="Identifiants" styleClass="column">
						<h:outputText value="#{articls.articleId}" />
					</p:column>

					<p:column headerText="Contenus" styleClass="column">
						<h:outputText value="#{articls.articleContenu}" />
					</p:column>
				</p:dataTable>
				<p:separator />
				<p:commandButton value="Imprimer" disabled="true"
					icon="ui-icon-trash" update="@all" styleClass="btImp"
					binding="#{wizardBean.btnImp}"
					action="#{wizardBean.imprimerDetailArticle}">
					<p:confirm header="Confirmation" message="Voulez-vous imprimer ?"
						icon="ui-icon-alert" />
				</p:commandButton>

				<p:confirmDialog global="true" showEffect="puff"
					hideEffect="explode">
					<p:commandButton value="Oui" type="button"
						styleClass="ui-confirmdialog-yes" icon="ui-icon-check" />
					<p:commandButton value="Non" type="button"
						styleClass="ui-confirmdialog-no" icon="ui-icon-close" />
				</p:confirmDialog>
			</p:panel>
		</h:form>
	</ui:define>
</ui:composition>
